package com.ifnk.portaljava.hlyt.beans;

import java.io.Serializable;
import java.util.*;
/**
 * <p>Title:用户类</p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2010</p>
 *
 * <p>Company: </p>
 *
 * @author  xiaoyan.zhang.hlyt@gmail.com
 * @version 1.0
 */
public class User implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2613855837834459761L;
	private int id;
	private String name;
	private String password;
	private int enable;
	private Date createtime;
	private Date disabletime;
	private int locked;
	private Date laststattime;

	private Set<Role> roleSet = new HashSet<Role>();
	private String roleString;
	private String createtimeString;
	private String disabletimeString;
	private String loginIp;

	private Set<UserAllowedIp> allowedIpSet = new HashSet<UserAllowedIp>();
	private List<Module> userModuleList = new ArrayList<Module>();
	private String tips;
	private String lastmodule;

	public String toString() {
		return name + ":" + password + ":";
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getEnable() {
		return enable;
	}

	public void setEnable(int enable) {
		this.enable = enable;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getDisabletime() {
		return disabletime;
	}

	public void setDisabletime(Date disabletime) {
		this.disabletime = disabletime;
	}

	public int getLocked() {
		return locked;
	}

	public void setLocked(int locked) {
		this.locked = locked;
	}

	public Set<Role> getRoleSet() {
		return roleSet;
	}

	public void setRoleSet(Set<Role> roleSet) {
		this.roleSet = roleSet;
	}

	public String getCreatetimeString() {
		return createtimeString;
	}

	public void setCreatetimeString(String createtimeString) {
		this.createtimeString = createtimeString;
	}

	public String getDisabletimeString() {
		return disabletimeString;
	}

	public void setDisabletimeString(String disabletimeString) {
		this.disabletimeString = disabletimeString;
	}

	public String getRoleString() {
		return roleString;
	}

	public void setRoleString(String roleString) {
		this.roleString = roleString;
	}

	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}

	public Set<UserAllowedIp> getAllowedIpSet() {
		return allowedIpSet;
	}

	public void setAllowedIpSet(Set<UserAllowedIp> allowedIpSet) {
		this.allowedIpSet = allowedIpSet;
	}

	public String getTips() {
		return tips;
	}

	public void setTips(String tips) {
		this.tips = tips;
	}

	public List<Module> getUserModuleList() {
		return userModuleList;
	}

	public void setUserModuleList(List<Module> userModuleList) {
		this.userModuleList = userModuleList;
	}

	public String getLastmodule() {
		return lastmodule;
	}

	public void setLastmodule(String lastmodule) {
		this.lastmodule = lastmodule;
	}

	public void setLaststattime(Date laststattime) {
//		System.out.println("setLaststattime="+laststattime);
		this.laststattime = laststattime;
	}

	public Date getLaststattime() {
		return laststattime;
	}
}
